#ifndef __SKINDETECTOR_H__
#define __SKINDETECTOR_H__

#include <opencv2/opencv.hpp>

class SkinDetector {
public:
	enum SkinDetectionMethod {
		HSV_DETECTION, RGB_DETECTION
	};
    
	SkinDetector();
	virtual ~SkinDetector();
    
	void detect(const cv::Mat &image, cv::Mat &result,
                SkinDetectionMethod method);
    
private:
	bool isSkin(unsigned char hue, unsigned char sat);
	bool isSkin(unsigned char red, unsigned char green, unsigned char blue);
	void detectSkinFromHsvColorSpace(const cv::Mat & image, cv::Mat & result);
	void detectSkinFromRgbColorSpace(const cv::Mat & image, cv::Mat & result);
    
};

#endif /* __SKINDETECTOR_H__ */
